/*****************************************************************************/
/*!	\file		PrintView.h
 *	\brief		Header file for the YX-PIS Example
 *	\par		Dalian Yunxing Tech Co., Ltd.
 *
 *				Dalian, China
 *				Phone   : +86 (411) 8825 4852
 *				Email   : yx@yunxing.tech
 */
/*****************************************************************************/
#ifndef PRINT_VIEW_INCLUDED
#define PRINT_VIEW_INCLUDED 1

#include <stdio.h>
#include "IEC61850Types.h"


void PrintServerFullView();
void PrintServerHeader();
void PrintDataView();
void PrintErrorString();
void PrintServerMenuView();

void PrintClientFullView();
void PrintClientHeader();
void PrintClientMenuView();
void PrintReportMenuView();
void PrintControlMenuView();
void PrintGooseAndSVMenuView();
void PrintFileMenuView();
void PrintLogMenuView();
void PrintSettingGroupMenuView();
void PrintDataAccessMenuView();
void PrintRPCAccessMenuView();

void PrintServerSubscriptionFullView();
void PrintServerSubscriptionHeader();
void PrintServerSubscriptionDataView();
void PrintServerSubscriptionMenuView();

const char* BooleanToString(Boolean inBool);
const char* DBPosToString(eDbPosValues inDBPosVal);
void ClearScreen();

void PrintStringList(StringList* list);
void PrintServiceError(eServiceError error);
void PrintMoreFollows(Boolean moreFollows);
void PrintTimeStamp(IEC61850_TimeStamp* timestamp);
void PrintQuality(void* quality, unsigned int printLevel, Boolean bDetailed);
void PrintDbpos(void* dbpos);
void PrintTcmd(void* tcmd);
void PrintCheck(void* check);
void PrintEntryIDAsUnsigned64(U8* entryID);

void PrintRCBValues(RCBValues* rcbValues, Boolean buffFlag);
void PrintLogCBVals(LCBValues* lcbValues);
void PrintGoCBVals(GoCBValues* cbValues);
void PrintMSVCBVals(MSVCBValues* cbValues);
void PrintSGCBVals(SGCBValues* sgcbValues);
void PrintAllCBValues(GetAllCBValsReturn* allCBVals);
void PrintLogVals(IEC61850_LogEntries* logEntries);
void PrintLogStatus(IEC61850_GetLogStatus_ResultList* log);
void PrintDAVal(IEC61850_DataAttributeData* dataAttribute, int level);
void PrintDataType(unsigned int dataType, unsigned int bitLength, unsigned int printLevel);
void PrintDataValue(const IEC61850_DataAttributeData* value, unsigned int printLevel, Boolean bDetailed);
void PrintDataDefinitions(DataDefinitions* dataDefinitions, Boolean bPrintAll);
void PrintDataDefinition(DataDefinition* dataDefinition, unsigned int printLevel);

void PrintDataDirectory(DataDirectoryList* dataDirectoryList);
void PrintDataSetDirectory(FCDAList* fcdaList);
void PrintAllDataVals(IEC61850_DataAttributeValues* allDataVals);
void PrintDataVals(DataValsList* dataVals);
void PrintErrorList(ServiceErrorList* serErrList);
void PrintFCDAList(FCDAList* fcdaList);
void PrintLogCBValsList(LCBValuesList* lcbValuesList);
void PrintSGCBValsList(SGCBValuesList* cbValuesList);
void PrintGoCBValsList(GoCBValuesList* cbValuesList);
void PrintMSVCBValsList(MSVCBValuesList* cbValuesList);
void PrintSetRCBValue(SetRCBValues* setRCBVal, Boolean bBuffered);
void PrintSetLCBValues(tSetLcbValuesList* list);
void PrintSetLCBValue(tSetLCBValues* setLCBVal);
void PrintSetLCBResults(SetLCBErrorList* list);
void PrintSetLCBResult(tSetLCBErrors* setLCBErr);
void PrintSetGoCBValues(SetGoCBValues_Request* values);
void PrintSetGoCBValue(tSetGoCBValues* value);
void PrintSetGoCBResults(SetGocbErrorList* results);
void PrintSetGoCBResult(SetGoCBErrors* result);
void PrintSetMSVCBValues(SetMSVCBValues_Request* values);
void PrintSetMSVCBValue(tSetMSVCBValues* value);
void PrintSetMSVCBResults(SetMSVCBErrorList* results);
void PrintSetMSVCBResult(SetMSVCBErrors* result);
void PrintMethodList(MethodList* methodList);
void PrintGetRpcMethodDefinitionResult(GetRpcMethodDefinitionResultList* reference);
void PrintFileEntry(FileEntry* fileEntry);
void PrintCMSDataDefinition(CMSDataDefinition* dataDefinition, unsigned int printLevel);
void PrintCMSStructureDataDefinition(CMSDataDefinition* dataDefinition, unsigned int printLevel);
void PrintCMSArrayDataDefinition(CMSDataDefinition* dataDefinition, unsigned int printLevel);
void PrintCMSData(RpcData* data, unsigned int printLevel, Boolean bDetailed);

void PrintGetServerDirectoryResponse(GetServerDirectory_Response* response);
void PrintGetLogicalDeviceDirectoryResponse(GetLogicalDeviceDirectory_Response* response);
void PrintGetLogicalNodeDirectoryResponse(GetLogicalNodeDirectory_Response* response);
void PrintGetAllDataValuesResponse(GetAllDataValues_Response* response);
void PrintGetAllDataDefinitionResponse(GetAllDataDefinition_Response* response);
void PrintGetAllCBValuesResponse(GetAllCBValues_Response* response);
void PrintGetDataValuesResponse(GetDataValues_Response* response);
void PrintSetDataValuesResponse(SetDataValues_Response* response);
void PrintGetDataDirectoryResponse(GetDataDirectory_Response* response);
void PrintGetDataDefinitionResponse(GetDataDefinition_Response* response);

void PrintGetDataSetDirectoryResponse(GetDataSetDirectory_Response* response);
void PrintGetDataSetValuesResponse(GetDataSetValues_Response* response);
void PrintSetDataSetValuesResponse(SetDataSetValues_Response* response);

void PrintGetBRCBValuesResponse(GetBRCBValues_Response* response);
void PrintSetBRCBValuesResponse(SetBRCBValues_Response* response);
void PrintGetURCBValuesResponse(GetURCBValues_Response* response);
void PrintSetURCBValuesResponse(SetURCBValues_Response* response);

void PrintGetLCBValuesResponse(GetLCBValues_Response* response);
void PrintSetLCBValuesResponse(SetLCBValues_Response* response);
void PrintQueryLogByTimeResponse(QueryLogByTime_Response* response);
void PrintQueryLogAfterResponse(QueryLogAfter_Response* response);
void PrintGetLogStatusValuesResponse(GetLogStatusValues_Response* response);

void PrintGetGoCBValuesResponse(GetGoCBValues_Response* response);
void PrintSetGoCBValuesResponse(SetGoCBValues_Response* response);

void PrintGetMSVCBValuesResponse(GetMSVCBValues_Response* response);
void PrintSetMSVCBValuesResponse(SetMSVCBValues_Response* response);

void PrintSelectActiveSGResponse(SelectActiveSG_Response* response);
void PrintSelectEditSGResponse(SelectEditSG_Response* response);
void PrintSetEditSGValueResponse(SetEditSGValue_Response* response);
void PrintConfirmEditSGValuesResponse(ConfirmEditSGValues_Response* response);
void PrintGetEditSGValueResponse(GetEditSGValue_Response* response);
void PrintGetSGCBValuesResponse(GetSGCBValues_Response* response);

void PrintGetFileResponse(GetFile_Response* response);
void PrintSetFileResponse(SetFile_Response* response);
void PrintGetFileAttributeValuesResponse(GetFileAttributeValues_Response* response);
void PrintGetFileDirectoryResponse(GetFileDirectory_Response* response);

void PrintGetRpcInterfaceDirectoryResponse(GetRpcInterfaceDirectory_Response* response);
void PrintGetRpcMethodDirectoryResponse(GetRpcMethodDirectory_Response* response);
void PrintGetRpcInterfaceDefinitionResponse(GetRpcInterfaceDefinition_Response* response);
void PrintGetRpcMethodDefinitionResponse(GetRpcMethodDefinition_Response* response);
void PrintRpcCallResponse(RpcCall_Response* response);

char* TranslateServiceError(eServiceError error);
char* TranslateSampleMode(SampleMode smpMod);
char* TranslateDataType(eDataTypeCMS dataType);
char* TranslateReasonCode(IEC61850_ReasonCode reasonCode);
char* TranslateDbpos(eDbPosValues eDbpos);
char* TranslateTcmd(eTcmdValue eTcmd);

#endif
